export default [
    {
        path: '/',
        redirect: '/home'
    },
    {
        path: '/home',
        component: () => import('@/pages/Home'),
        meta: { title: '首页' }
    },
    {
        path: '/login',
        component: () => import('@/pages/Login'),
        meta: { title: '登录' }
    },
    {
        path: '/register',
        component: () => import('@/pages/Register'),
        meta: { title: '注册' }
    },
    {
        path: '/products',
        component: () => import('@/pages/Search'),
        meta: { title: '商品搜索' }
    },
    {
        path: '/products/:id',
        component: () => import('@/pages/Detail'),
        meta: { title: '商品详情' }
    },
    {
        path: '/cart',
        component: () => import('@/pages/ShopCart'),
        meta: { 
            title: '购物车',
            requireAuth: true
        }
    },
    {
        path: '/order',
        component: () => import('@/pages/Trade'),
        meta: { 
            title: '订单',
            requireAuth: true
        }
    },
    {
        path: '/pay',
        component: () => import('@/pages/Pay'),
        meta: { 
            title: '支付',
            requireAuth: true
        }
    },
    {
        path: '/center',
        component: () => import('@/pages/Center'),
        meta: { 
            title: '个人中心',
            requireAuth: true
        },
        children: [
            {
                path: 'myorder',
                component: () => import('@/pages/Center/MyOrder'),
                meta: { title: '我的订单' }
            }
        ]
    }
]